{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Helpers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "def plot_function(f,tmin,tmax,tlabel=None,xlabel=None,axes=False, **kwargs):\n",
    "    ts = np.linspace(tmin,tmax,1000)\n",
    "    if tlabel:\n",
    "        plt.xlabel(tlabel,fontsize=18)\n",
    "    if xlabel:\n",
    "        plt.ylabel(xlabel,fontsize=18)\n",
    "    plt.plot(ts, [f(t) for t in ts], **kwargs)\n",
    "    if axes:\n",
    "        total_t = tmax-tmin\n",
    "        plt.plot([tmin-total_t/10,tmax+total_t/10],[0,0],c='k',linewidth=1)\n",
    "        plt.xlim(tmin-total_t/10,tmax+total_t/10)\n",
    "        xmin, xmax = plt.ylim()\n",
    "        plt.plot([0,0],[xmin,xmax],c='k',linewidth=1)\n",
    "        plt.ylim(xmin,xmax)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here are helper functions to plot volume or flow rate vs. time with correct labels."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "def plot_volume(f,tmin,tmax,axes=False,**kwargs):\n",
    "    plot_function(f,tmin,tmax,tlabel=\"time (hr)\", xlabel=\"volume (bbl)\", axes=axes, **kwargs)\n",
    "\n",
    "def plot_flow_rate(f,tmin,tmax,axes=False,**kwargs):\n",
    "    plot_function(f,tmin,tmax,tlabel=\"time (hr)\", xlabel=\"flow rate (bbl/hr)\", axes=axes, **kwargs)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 1 Calculating average flow rates from volumes"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "These are the *actual* volume and flow rate functions, used throughout the chapter.  You can ignore the formulas that define them."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "def volume(t):\n",
    "    return (t-4)**3 / 64 + 3.3\n",
    "\n",
    "def flow_rate(t):\n",
    "    return 3*(t-4)**2 / 64"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAESCAYAAAD9gqKNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XecXHW5x/HPs33Te+8JpAIpawKJ0lGaUgRFIyRELsJF5SoWEK+g6AVBEVBEEEJNQGkSlE4SQk0P6b1s+qbtJpvN1nnuHzOBZcludpKZObOz3/frNa/ZPXPmnO9S5plzfs3cHRERkbSgA4iISHJQQRAREUAFQUREIlQQREQEUEEQEZEIFQQREQFUEEREJEIFQUREABUEERGJyAg6QDTatWvnvXr1CjqGiEiDMXfu3J3u3r4++zaogtCrVy/mzJkTdAwRkQbDzDbUd1/dMhIREUAFQUREIlQQREQEUEEQEZEIFQQREQFUEEREJEIFQUREABUEEZGkNm15AY++v47yylDcz6WCICKSxP46fTWPf7CejDSL+7lUEEREktTK7fuYvX4P3xrZgzQVBBGRxmvyzHyy0tO4ZES3hJxPBUFEJAkdKK/i+XmbOHtIJ9o2y07IOVUQRESS0MsLt7CvtJKxo3ok7JwqCCIiSWjyzHz6dWjGyN5tEnZOFQQRkSSzeHMRCzYW8q2RPTCLf2PyQSoIIiJJ5okP15ObmZ6wxuSDVBBERJLInv3lvLRgCxcN70rL3MyEnlsFQUQkifxzzkbKKkNccVLPhJ9bBUFEJElUhZynZm5gZO82DOjUIuHnV0EQEUkS01cUsHH3Acad1CuQ86sgiIgkicc/3EDHFtl8eXDHQM6vgiAikgTW7dzPjJU7+PbInmSmB/PRrI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KwSGHyYTCKfoVtG0hg8drAYQLi4AHuBLYdYL+I9oFNkgSHM7DjgeGAykG1m7Q4+Ivvu59Df4Gtqz+eXRaxuS/ViEDE18tzvEPvfc6hiUM1u4rSqlqQuFQRpDNYeYtseYF0t2wHaRp4HRp5/TXjJyuqPAqAp0LEeGZxDr+BXV8ZdNbJUV9utp4OMRrI6oMSObhlJY1Bbz6O6eiRZjec/Uvv9+D21bK9uB9Cmjtfrk6W6ksOcr3XknCL1poIgDUkQ33hXRZ6r3P2tozjOYuBkM0tz91AMctUqMnAvI3JOkXrTLSNpSIojz3V90461+YQ/WK8xsz41XzSzDDOrT57pQHPCjcvxdrAL6jsJOJekEBUEaUhmAyHgZjP7rpldZmaj4nnCSK+gywnf0lkYGafwPTP7kZndD2wEvlaPQz1POPu58Uv7ifOAnUA8R0RLClJBkAbD3fOBCYSnqHiA8PiBaxNw3gXAMOApwh/+fyY8H9GJhLubvl2PY6wjvLb35XELCkQGyl1EuGdVWTzPJalHayqLJIiZnQR8AJx1lO0RdZ3jeuB3wLHuviUe55DUpYIgkkBm9gzQw91Hx+HYOYS7rz7o7r+O9fEl9akgiIgIoDYEERGJUEEQERFABUFERCJUEEREBFBBEBGRCBUEEREBVBBERCRCBUFERAD4f9RCPvcGoUFbAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_volume(volume,0,10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.1 Implementing an average_flow_rate function\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "def average_flow_rate(v,t1,t2):\n",
    "    return (v(t2) - v(t1))/(t2 - t1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3.3"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "volume(4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5.253125"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "volume(9)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.390625"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(volume,4,9)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.2 Picturing the average flow rate with a secant line"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.3 Negative rates of change"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "def decreasing_volume(t):\n",
    "    if t < 5:\n",
    "        return 10 - (t**2)/5\n",
    "    else:\n",
    "        return 0.2*(10-t)**2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAESCAYAAADjS5I+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xd4VHX6/vH3k54QCCUBpBmaIEUEgkrRteta1l5QEWzYddV1V9f9bXPXLX7t66ooigUrtrWsBRWxAgFEmiK9N4HQCUme3x8z7LKRjBkykzOZ3K/rmmuSmZNz7lGu3Dnt8zF3R0REpCopQQcQEZHEpqIQEZGIVBQiIhKRikJERCJSUYiISEQqChERiUhFISIiEakoRE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hZpbi7hUxyFWl8A2JaeFtilSLDj1Jstgcfo70l3msTSX0C/cKM+tQ+U0zSzOz6uQZBzQkdFI73nZdKvtxLWxLkoSKQpLFJKACuM3MLjGzc83s4HhuMHyV0hBCh4a+Dt9ncbmZ3WBmDwJLgJ9VY1UvE8p+QvzS/seJwFognneAS5JRUUhScPfFwMWEhup4iND9D1fWwna/AnoDzxAqhQcIjdd0CKHLYj+oxjoWEJq7fUjcggLhGwBPI3Sl1454bkuSi+bMFkkAZtYf+Bw4pobnOyJt43rgz8B+7r48HtuQ5KSiEEkQZvY80M7dB8Rh3VmELrN9xN3/EOv1S3JTUYiISEQ6RyEiIhGpKEREJCIVhYiIRKSiEBGRiFQUIiISkYpCREQiUlGIiEhEKgoREYno/wMg6YO3HAfJMgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_volume(decreasing_volume,0,10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.8"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(decreasing_volume,0,4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.4 Exercises"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Exercise:** Suppose you start a road-trip at noon, when your odometer reads 77,641 miles and you end your road-trip at 4:30 in the afternoon with your odometer reading 77,905 miles.  What was your average speed during the trip?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "58.666666666666664"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(77905 - 77641) / 4.5"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Exercise:** Write a Python function `secant_line(f,x1,x2)` that takes a function `f(x)` and two `x` values `x1` and `x2` and returns a new function representing a secant line over time.  For instance, if you ran `line = secant_line(f,x1,x2)` then `line(3)` would give you the $y$-value of the secant line at $x=3$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "def secant_line(f,x1,x2):\n",
    "    def line(x):\n",
    "        return f(x1) + (x-x1) * (f(x2)-f(x1))/(x2-x1)\n",
    "    return line"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Exercise:** Write a function that uses the code from the previous exercise to plot a secant line of a function f between two given points."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "def plot_secant(f,x1,x2,color='k'):\n",
    "    line = secant_line(f,x1,x2)\n",
    "    plot_function(line,x1,x2,c=color)\n",
    "    plt.scatter([x1,x2],[f(x1),f(x2)],c=color)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Example: secant line from t=4 to t=8 on our volume graph"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAESCAYAAAD9gqKNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xl4VPW9x/H3N3sCYQn7vsrqwpKCgkVEsSha960IY9VL9bbV29taa/VWreXWq9WqvdbW68KwuaEo7htQVJQdkX1P2AOBBELIOr/7xwwYkcQMzORMks/reeaZ5MyZcz5xme+c89vMOYeIiEic1wFERCQ2qCCIiAiggiAiIiEqCCIiAqggiIhIiAqCiIgAKggiIhKigiAiIo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gQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_volume(volume,0,10)\n",
    "plot_secant(volume,4,8)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 2 Plotting the average flow rate over time"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.1 Finding the average flow rate in different time intervals"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. , 5.5, 6. ,\n",
       "       6.5, 7. , 7.5, 8. , 8.5, 9. , 9.5])"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "np.arange(0,10,0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "def interval_flow_rates(v,t1,t2,dt):\n",
    "    return [(t,average_flow_rate(v,t,t+dt))\n",
    "                for t in np.arange(t1,t2,dt)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[(0, 0.578125),\n",
       " (1, 0.296875),\n",
       " (2, 0.109375),\n",
       " (3, 0.015625),\n",
       " (4, 0.015625),\n",
       " (5, 0.109375),\n",
       " (6, 0.296875),\n",
       " (7, 0.578125),\n",
       " (8, 0.953125),\n",
       " (9, 1.421875)]"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "interval_flow_rates(volume,0,10,1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.2 Plotting the interval flow rates alongside the flow rate function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [],
   "source": [
    "def plot_interval_flow_rates(volume,t1,t2,dt):\n",
    "    series = interval_flow_rates(volume,t1,t2,dt)\n",
    "    times = [t for (t,_) in series]\n",
    "    rates = [q for (_,q) in series]\n",
    "    plt.scatter(times,rates)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAEUlJREFUeJzt3X+sX3ddx/Hni7tOLj+khl4T26506qg0CCm5DHRGxg/TDc02EzRbBIUA/YcBCqmuagYZ8Q+oETQZYIM4Rdyco6kNKVwSwWBEyO4oUrZ5TTN+7LaYlR9FIxfX1rd/3Ntxe3fb7/f2fu/O937u85E0+Z7P+dxz3jnfc145Ped8zydVhSSpLU/qugBJ0uAZ7pLUIMNdkhpkuEtSgwx3SWqQ4S5JDTLcJalBhrskNchwl6QGXdLVijds2FBbt27tavWStCrdd99936qqsV79Ogv3rVu3Mjk52dXqJWlVSvL1fvp5WUaSGmS4S1KDDHdJapDhLkkNMtwlqUGGuyQ1yHCXpAZ19py7JK0lBw4fY+/EFMdPzrBx/Si7d27jhh2bVmx9hrskrbADh4+xZ/8RZk6dAeDYyRn27D8CsGIB72UZSVpheyemHgv2s2ZOnWHvxNSKrbNnuCf5cJJHknylR78XJjmT5FWDK0+SVr/jJ2eW1D4I/Zy53wFcc6EOSUaAdwMTA6hJkpqycf3oktoHoWe4V9Vnge/06PZm4GPAI4MoSpJasnvnNkbXjZzTNrpuhN07t63YOpd9QzXJJuBXgZcBL+zRdxewC2DLli3LXbUkrQpnb5qutqdl3gf8XlWdSXLBjlW1D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MnrHfuJJFS5IurK8fMVXVIeDQgrZb533+AfBrgy1NknSxfLeMJDXIcJekBhnuktQgw12SGtTZANlJTgBfX8YiNgDfGlA5q53b4lxujx9yW5yrhe3xrKoa69Wps3BfriST/YwAvha4Lc7l9vght8W51tL28LKMJDXIcJekBq3mcN/XdQFDxG1xLrfHD7ktzrVmtseqveYuSTq/1XzmLkk6j1UX7r3Gc11LklyW5DNJHkxyf5K3dl1T15KMJDmc5ONd19K1JOuT3JPk3+f2kZ/ruqauJPmduWPkK0nuTPLkrmtaaasq3Pscz3UtOQ28vaqeA7wYeNMa3x4AbwUe7LqIIfGnwCer6meA57NGt0uSTcBbgPGqei6zb7dt/s21qyrc6W881zWjqr5ZVV+c+/zfzB68a3a0iiSbgV8GPtR1LV1L8qPALzL7Om6q6tGqOtltVZ26BBidG0zoKTx+wKHmrLZw72c81zUpyVZgB/CFbivp1PuA3wX+r+tChsBPAieAv5y7TPWhJE/tuqguVNUx4I+BbwDfBL5XVZ/qtqqVt9rCva+xWteaJE8DPgb8dlX9V9f1dCHJrwCPVNV9XdcyJC4BXgB8oKp2AP8DrMl7VEl+jNn/4V8ObASemuTV3Va18lZbuPcznuuakmQds8H+0ara33U9HboKuC7J15i9XPeyJH/TbUmdmgamq+rs/+TuYTbs16JXAF+tqhNVdQrYD/x8xzWtuNUW7v2M57pmJAmz11QfrKo/6bqeLlXVnqraXFVbmd0vPl1VzZ+dnU9V/SfwcJJtc00vBx7osKQufQN4cZKnzB0zL2cN3Fzua5i9YXG+8Vw7LqtLVwGvAY4k+dJc2+/PDYsovRn46NyJ0EPA6zqupxNV9YUk9wBfZPYJs8OsgV+q+gtVSWrQarssI0nqg+EuSQ0y3CWpQYa7JDXIcJekBhnuktQgw12SGmS4S1KD/h/d+4Y+Cl2NgAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_interval_flow_rates(volume,0,10,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAESCAYAAADaLCNlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xd4VGX2wPHvSQgQmpSEXkINRZoEEHERbOCqgNhAVKxYV1ddVHZ/a8Fd113WtYuCIqir2BDZXRSliYAooddACC0JkEAINYGU8/vjDjrGJMzATG5mcj7PM89kbj2TMif3vu97XlFVjDHGmDMV4XYAxhhjwoMlFGOMMQFhCcUYY0xAWEIxxhgTEJZQjDHGBIQlFGOMMQFhCcUYY0xAWEIxxhgTEJXcOrGITAauADJU9exi1o8BRnpeVgI6ALGqmiUi24HDQAGQr6oJZRO1McaYkohbI+VFpB9wBHi3uIRSZNsrgYdU9ULP6+1Agqru8+ecMTExGhcXd3oBG2NMBbR8+fJ9qhrry7auXaGo6kIRifNx8xHAh2d6zri4OBITE8/0MMYYU2GIyA5fty33bSgiUg0YBHzmtViBr0VkuYiMdicyY4wx3ly7QvHDlcBiVc3yWtZXVdNFpD7wjYhsUtWFxe3sSTijAZo3bx78aI0xpoIq91cowHCK3O5S1XTPcwbwOdCrpJ1VdaKqJqhqQmysT7cBjTHGnIZynVBE5CzgAuALr2XVRaTmya+BS4F17kRojDHmJDe7DX8I9AdiRCQVeBKIAlDVNzybXQV8rapHvXZtAHwuIuDE/4GqflVWcRtjjCmem728RviwzRRgSpFlKUDX4ERljDHmdJXrW17GGGNChyUUY4wJYwuSMpiyeBsn8guDfi5LKMYYE6ZUlRe+2cyUJduJjJCgn88SijHGhKnvU/azOvUgd/ymlSUUY4wxp2/Cgq3E1KjCNT2alsn5LKEYY0wYWpt6k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wxAWEJxRhjTED8P9fQ/Xi7UzFUAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_flow_rate(flow_rate,0,10)\n",
    "plot_interval_flow_rates(volume,0,10,1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Average flow rate on 20 minute (1/3 hour) intervals, compared to actual `flow_rate` function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAESCAYAAADaLCNlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xd4VGX2wPHvSSOhBkgoCUIokSY9gogFK9gAXQusDUVxLWvZ/WHZte+usrquunZU7IodcUVZBBHXCkiRXhVCEAIYagIp5/fHnbBjmJnMkJm5k8n5PM88ydx7574nySQn977ve15RVYwxxpiaSnA7AGOMMfHBEooxxpiwsIRijDEmLCyhGGOMCQtLKMYYY8LCEooxxpiwsIRijDEmLCyhGGOMCYsktxoWkYnAmcAWVT3Cx/5xwIWep0lAVyBTVbeLyI/ALqAcKFPVvOhEbYwxxh9xa6a8iBwH7AZe9pVQqhx7FnCTqp7oef4jkKeqW0NpMyMjQ3Nycg4tYGOMqYPmzZu3VVUzgznWtSsUVZ0tIjlBHj4KeKOmbebk5DB37tyansYYY+oMEfkp2GNjvg9FROoDQ4F3vTYr8B8RmSciY92JzBhjjDfXrlBCcBbwpapu99o2SFULRKQFMF1ElqvqbF8v9iScsQBt27aNfLTGGFNHxfwVCjCSKre7VLXA83EL8D7Q39+LVXWCquapal5mZlC3AY0xxhyCmE4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Tgj2/ZFsi0Tf2xNeWNqCREZCHwFnFLD/phAbdwA/A04XFULItGGiV+WUIypRURkEtBWVY+OwLlTcYYfP6Oq94T7/Cb+WUIxxhgTFtaHYowxJiwsoRhjjAkLSyjGGGPCwhKKMcaYsLCEYowxJiwsoRhjjAkLSyjGGGPCwhKKMcaYsPh/R+yMbCHzkYgAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_flow_rate(flow_rate,0,10)\n",
    "plot_interval_flow_rates(volume,0,10,1/3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.3 Exercises"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Exercise:** Plot the `decreasing_volume` flow rates over time on 0.5 hour intervals.  When is it’s flow rate the lowest?  That is, when is oil leaving the tank at the fastest rate?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAD8CAYAAACCRVh7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAF3tJREFUeJzt3X9sHPd95vH3U4pKN2l69A8lFmUTclqBFze+k4qFr6mBoLHlo+0WkSzYORu4nHrnQlcgbpOm5VmsCzQIWlgp07hFmstVtZ2orZvYdWhaiN1jbNm9AIeLL1SoMyXrWKuOk2ipWMrFbILz1pHkT//Yobpidri7nBWHw31ewII735nvzmfJ3Xm4M7PfUURgZmbWyI/lXYCZma1cDgkzM0vlkDAzs1QOCTMzS+WQMDOzVA4JMzNL1bGQkHSjpBlJxyTtbjD/TZIeTuY/J2lj3byRpH1G0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MUuZvXBdFRJyRND80SA/wYN3QIN3gWuADwLSkQ0nbbyffhLfu8GvAQ8k/SS8B/zHnepZNRDwn6VHg69TO9JtilX/7WtLngV8ALpV0HPhdYA/wiKQ7qQXnbU0fx9+4NjOzNN20u8nMzNrkkDAzs1QOCTMzS+WQMDOzVA4JMzNL5ZAwM7NUDgkzM0vlkDAzs1T/BA5xSySkqeJEAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_interval_flow_rates(decreasing_volume,0,10,0.5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Exercise:** Write a linear volume function and plot the flow rate over time to show that it is constant."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAD8CAYAAAB3u9PLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAEyhJREFUeJzt3X+QZWV95/H3Z2dGBYTix7QUzqDj1lISKxKYXIGECr+yQRBKMJrSlAhLUTuyRRLzA1R2K1qFoViDtRqqUhDiT0pBtwjEWQqZMSNEq6KW3ZkBxiBhNpLQzCTTFEIsdRNHv/vHfTq5NLe77226+0L3+1V16p77PM8553sa6n7ufe65Z1JVSJL0H0ZdgCTphcFAkCQBBoIkqTEQJEmAgSBJagwESRJgIEiSmoECIcljSR5KsivJeJ/+JLkxyZ4kDybZ3NN3b5Knk9w9Y5tPJ/lu2+euJCc+/9ORJC3U2iHGnlVVT87Sdx5wXFtOAW5qjwA3AAcD7+6z3dVVdccQNUiSlsgwgTCXC4Fbq/uz528kOTzJMVW1r6p2JD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kA/BbdH/L9LPAGuAdo61qSX2a7qX8vd4P7Kiq4+jeRmhBb3xXfCAAJwN7qurvqupfgc/z7/daWrGqal9V/XVb/z7dF4YNo61qeQxw760VKclhwOnAJwCq6l+r6unRVrVs1gIHJVkLHAzsHXE9S6aqvgo8NaP5QuAzbf0zwEUL2fdqCIQNwOM9zydZJS+M05JsAk4CvjnaSpbNfPfeWqn+IzBF9x5hO5N8PMkhoy5qqVXVE3TvuPwPdO+Z9kxVbR9tVcvu6KraB903g8CC/jmB1RAI/W6at2ourWq3Evkz4Ler6p9HXc9SG/DeWyvVWmAzcFNVnQT8gAVOHbyYtPnyC4HXAK8EDknS99Y6mttqCIRJ4Nie5xtZwR8ne7XbgvwZ8LmqunPU9SyT04A3J3mM7vTg2Uk+O9qSls0kMFlV058E76AbECvdfwa+W1VTVfVj4E7gF0dc03L7pyTHALTHBf37MqshEL4FHJfkNUleQvfLpq0jrmnJtduJfwJ4uKr+16jrWS5VdU1VbayqTXT/W39lthsxrjRV9Y/A40le25p+GfibEZa0XP4BODXJwe3/+19mFXyZPsNW4NK2finwxYXsZKhbV7wYVdWBJL8BbKN79cEnq+rbIy5rOZxG9y61DyXZ1dr+e1XdM8KatPR+E/hce/Pzd8BlI65nyVXVN5PcAfw13avrdrKCf7Gc5Ha6949bn2QS+CDwP4H/neRyugH5awvat79UliTB6pgykiQNwECQJAEGgiSpMRAkSYCBIElqDARJEmAgSJIaA0GSBMD/B1zmuaf5jn6GAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "def linear_volume_function(t):\n",
    "    return 5*t + 3\n",
    "\n",
    "plot_interval_flow_rates(linear_volume_function,0,10,0.25)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 3 Approximating instantaneous flow rates"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3.1 Finding the slope of very small secant lines"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "These calculations result in numbers converging (getting closer and closer) to a value of `0.421875`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.42578125"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(volume,0.5,1.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.4220312499999988"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(volume,0.9,1.1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.42187656249998945"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(volume,0.99,1.01)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.42187501562509583"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(volume,0.999,1.001)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.42187500015393936"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(volume,0.9999,1.0001)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.4218750000002602"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(volume,0.99999,1.00001)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Compare to actual value from flow rate function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.421875"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "flow_rate(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3.2 Building the instantaneous flow rate function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [],
   "source": [
    "def instantaneous_flow_rate(v,t,digits=6):\n",
    "    tolerance = 10 ** (-digits) #<1>\n",
    "    h = 1\n",
    "    approx = average_flow_rate(v,t-h,t+h) #<2>\n",
    "    for i in range(0,2*digits): #<3>\n",
    "        h = h / 10\n",
    "        next_approx = average_flow_rate(v,t-h,t+h) #<4>\n",
    "        if abs(next_approx - approx) < tolerance:\n",
    "            return round(next_approx,digits) #<5>\n",
    "        else:\n",
    "            approx = next_approx #<6>\n",
    "    raise Exception(\"Derivative did not converge\") #<7>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.421875"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "instantaneous_flow_rate(volume,1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3.3 Currying and plotting the instantaneous flow rate function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_flow_rate_function(v):\n",
    "    def flow_rate_function(t):\n",
    "        instantaneous_flow_rate(volume,t)\n",
    "    return flow_rate_function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD8CA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/iEiEUfGLiEQYFb+ISIRR8YuIRBgVv4hIhPl/gJ3tywEIzeUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_function(flow_rate,0,10)\n",
    "plot_function(get_flow_rate_function(volume),0,10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3.4 Exercises"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Exercise:** Confirm that the graph of the `volume` function is not a straight line on the interval from 0.999 hours to 1.001 hours."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.878125"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "volume(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.8781248593749997"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "secant_line(volume,0.999,1.001)(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Exercise:** Approximate the slope of a tangent line to the `volume` graph at $t=8$ by computing the slopes of smaller and smaller secant lines around $t=8$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.7501562500000007"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(volume,7.9,8.1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.750001562499996"
      ]
     },
     "execution_count": 70,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(volume,7.99,8.01)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.7500000156249458"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(volume,7.999,8.001)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.7500000001554312"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(volume,7.9999,8.0001)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Exercise:** For the sign function defined in Python below, convince yourself that it doesn’t have a derivative at $x=0$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [],
   "source": [
    "def sign(x):\n",
    "    return x / abs(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10.0"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(sign,-0.1,0.1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "100.0"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(sign,-0.01,0.01)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1000.0"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(sign,-0.001,0.001)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1000000.0"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "average_flow_rate(sign,-0.000001,0.000001)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 4 Approximating the change in volume"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.1 Finding the change in volume on a short time interval"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [],
   "source": [
    "def small_volume_change(q,t,dt):\n",
    "    return q(t) * dt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.1875"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "small_volume_change(flow_rate,2,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.109375"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "volume(3) - volume(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.001875"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "small_volume_change(flow_rate,2,0.01)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.0018656406250001645"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "volume(2.01) - volume(2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.2 Breaking up time into small intervals"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {},
   "outputs": [],
   "source": [
    "def volume_change(q,t1,t2,dt):\n",
    "    return sum(small_volume_change(q,t,dt)\n",
    "               for t in np.arange(t1,t2,dt))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4.32890625"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "volume_change(flow_rate,0,10,0.1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4.375"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "volume(10) - volume(0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4.3749531257812455"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "volume_change(flow_rate,0,10,0.0001)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.3 Picturing the volume change on the flow rate graph"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.4 Exercises"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Exercise:** Approximately how much oil is added to the tank in the first 6 hours?  In the last 4 hours?  During which time interval is more added?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.1278171874999996"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "volume_change(flow_rate,0,6,0.01)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3.2425031249999257"
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "volume_change(flow_rate,6,10,0.01)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 5 Plotting the volume over time"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 5.1 Finding the volume over time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [],
   "source": [
    "def approximate_volume(q,v0,dt,T):\n",
    "    return v0 + volume_change(q,0,T,dt)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {},
   "outputs": [],
   "source": [
    "def approximate_volume_function(q,v0,dt):\n",
    "    def volume_function(T):\n",
    "        return approximate_volume(q,v0,dt,T)\n",
    "    return volume_function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAESCAYAAAD9gqKNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XeYVPX1x/H32UavgiACUkQQbCh2o9iiUSPWaGLsiTWJMTExiSZG04zGaIoajb3FELDFFvlh7xQRUbCAdKSzwLJtZs7vjzury7o7O7PMnTs7+3k9zz6ze+feuWfEZ8582/mauyMiIlIUdQAiIpIflBBERARQQhARkSQlBBERAZQQREQkSQlBREQAJQQREUlSQhAREUAJQUREkkqiDiATvXr18kGDBkUdhohIqzFt2rRV7t47nXNbVUIYNGgQU6dOjToMEZFWw8wWpHuuuoxERARQQhARkSQlBBERAZQQREQkSQlBREQAJQQREUlSQhAREUAJQUQkv330HLz5D4jVhH4rJQQRkXz26p/h7dugKPx1xEoIIiL5asVsWPgG7HEWFIX/ca2EICKSr6beDcVlsNtpObmdEoKISD6q2QTvPgw7HgudeuXklkoIIiL56P1HoLocxpyTs1sqIYiI5KOpd0Ov4bDdfjm7pRKCiEi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ykoDwCbAOcB/yeL4qazU3j2ouBHgSb51QR7Lr1mJmdDPwT+BfwGPBVgvpAK4Df1l1sZnsAzwPrgNuAJQQ7lP0A2N/MDkpW30zlIKAc+KiJ57cFXgQeBX6SfP3zga7JuBp6EKgEbiDoIlpW77k3ko9jgWebiUvkc0oI0iq4+0wze4MgIUxy9xczuLwfMNLdywHM7HngXYIkc1K9EuH/MLNpBAnkt/Wuv4vgA3fP5C50JF9ncvI1TiPY9jCVkcA8b7p42PbAKe4+vt7rJ4CLzGyEu89pcP464DB3jzV8IXdfYGYxYFQzMYlsRl1G0hbcU5cMIEguwHpgaSP7RbwK9E1uMISZ7QzsAjwEtDOzXnU/yXMraPwbfEO9+fK2iPUtrZ8Mkp5PPm7fyPk3NZYM6llDSLtqSeFSQpC2YF4jx9YCnzZxHGCr5OOOycerCbasrP+zAugE9EkjBqfxHfxSxbi6QSz1NdX1VMdoI7sDSvaoy0jagqZmHqWakWQNHm+g6f74tU0cr28l0DPF8+nEUt+mZu7XI3lPkbQpIUhrEsU33o+Tj3F3/78teJ1ZwIFmVuTuiSzE1aTkwr2S5D1F0qYuI2lNNiYfU33TzrZ3CD5YLzCzIQ2fNLMSM0snnheBLgSDy2Grm4L6Ug7uJQVECUFakylAArjCzM41s1PNbO8wb5icFXQ6QZfOzOQ6hfPN7FIzuxlYBBybxktNJIj9qPCi/dzRwCogzBXRUoCUEKTVcPeFwDkEJSpuJVg/cGEO7jsDGA08QPDh/zeCekT7EEw3nZzGa3xKsLf36aEFCiQXyh1PMLOqOsx7SeHRnsoiOWJm+wKvA4dv4XhEqntcAvwO2MHdl4ZxDylcSggiOWRmDwMD3X2/EF67PcH01dvc/epsv74UPiUEEREBNIYgIiJJSggiIgIoIYiISJISgoiIAEoIIiKSpIQgIiKAEoKIiCQpIYiICAD/DyFF0152bet2AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_volume(approximate_volume_function(flow_rate,2.3,0.5),0,10)\n",
    "plot_volume(volume,0,10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 5.2 Picturing Riemann sums for the volume function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5])"
      ]
     },
     "execution_count": 93,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.arange(0,3.9,0.5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 5.3 Improving the approximation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAESCAYAAAD9gqKNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XecFPX9x/HXZ6/SexWRIiqgQZTYMHajsRtbYjdGozGJMaZomsb8jLFFTWKNRrGL3cQeFIkRCwgCoiIg5WgH1/u2z++PWfRAOG/h9uZu7/18PPaxdzOzM++l7Gdn5lvM3REREYmEHUBERNoGFQQREQFUEEREJEUFQUREABUEERFJUUEQERFABUFERFJUEEREBFBBEBGRlNywA6Sjb9++PmzYsLBjiIi0GzNnzlzn7v2as227KgjDhg1jxowZYccQEWk3zGxpc7fVJSMREQFUEEREJEUFQUREABUEERFJUUEQERFABUFERFJUEEREBFBBEBFp2xa8Am/fAfFoxg+lgiAi0pa9+Rd4906IZL4fsQqCiEgbUxdN8Oi7y3j2lf/Asul80P84iGT+41oFQUSkjXn9k2Iue2oupdPuosFzufTTnVvluO1qLCMRk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30xgKC4AJXAyk3MF/EmMDA1wRBmtgvwNeBhoMDM+q5/pLatYdPf4DfWjy9Pi9jYysbFIOW11PP2m9j+5k0Vg0ZKydCsWpK9VBCkI1i8iWVlwGebWQ7QJ/U8OvX8B4IpKxs/ioEuwIBmZHA2PYNfUxlLNsrS2OYuPa1ndJDZAaXl6JKRdASba3nUVIsk2+j5RjZ/Pb5sM8sbWwv0bmJ9c7I0VvsVx+uVOqZIs6kgSHsSxjfeT1PPCXf/z1bsZx6wn5lF3D3ZArk2K9VxLzd1TJFm0yUjaU+qU89NfdNuabMIPlgvMLMRG680s1wza06eqUA3gpvLmba+CeobrXAsySIqCNKevAckgd+Y2blm9h0z2zOTB0y1CjqD4JLOnFQ/hR+Y2SVmdiuwHDimGbt6kiD7EZlL+7kjgXVAJntESxZSQZB2w92XAd8jGKLidoL+Axe2wnFnA+OBBwk+/P9GMB7RXgTNTac0Yx+fEcztfUbGggKpjnLHE7SsasjksST7aE5lkVZiZnsDbwGHbuX9iKaOcTFwNbCDu6/MxDEke6kgiLQiM3sUGOru+2Rg34UEzVfvdPc/tPT+JfupIIiICKB7CCIikqKCICIigAqCiIikqCCIiAiggiAiIikqCCIiAqggiIhIigqCiIgA8P8zwbTV7QAxowAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_volume(approximate_volume_function(flow_rate,2.3,0.1),0,10)\n",
    "plot_volume(volume,0,10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAESCAYAAAD9gqKNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGx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cLm7v1zp9cPA98yst7svOWj53cCZ7l5x8Au5+1ozqwD6HSaTyBdol5HUB08dKAOIlAuwB9h4iPkiPgTaRScYwsz6A8cDzwPZZtbqwFd02SIO/Rf8wVrz5WkRK9tYuQyi3o3e9jjE8o8cqgwq2UmCZtWS1KVCkPpg1SHu2wWsruJ+gJbR2z7R23uJTFlZ+Wsr0AhoW4MMzqFn8Ksu446DslRW1a6nA4x6MjugxI92GUl9UNWZR9WdkWQH3f6eqvfH76ri/sq2AS2qebwmWSorPsz6mkfXKVJjKgSpS4L4i3d59Dbk7v85itdZCJxmZmnuHo5DripFL9zLiK5TpMa0y0jqkn3R2+r+0o63OUQ+WG8ys24HP2hmGWZWkzxTgcZEDi4n2oFTUKfVwrokhagQpC75BAgDPzez75jZFWZ2UiJXGD0r6Coiu3TmR69TuNHMbjOzPwPrgK/V4KVeJZL9vMSl/cz5wHYgkVdESwpSIUid4e4FwPVEhqj4K5HrB26uhfXOBQYBzxL58P8jkfGIhhE53XRKDV5jNZG5va9KWFAgeqHcxUTOrCpN5Lok9WhOZZFaYmbDgY+As47yeER16/gh8GvgWHffmIh1SOpSIYjUIjN7Eejs7icn4LUbEDl99W/ufm+8X19SnwpBREQAHUMQEZEoFYKIiAAqBBERiVIhiIgIoEIQEZEoFYKIiAAqBBERiVIhiIgIAP8fGlyHbaZIDGQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_volume(approximate_volume_function(flow_rate,2.3,0.01),0,10)\n",
    "plot_volume(volume,0,10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_volume_function(q,v0,digits=6):\n",
    "    def volume_function(T):\n",
    "        tolerance = 10 ** (-digits)\n",
    "        dt = 1\n",
    "        approx = v0 + volume_change(q,0,T,dt)\n",
    "        for i in range(0,digits*2):\n",
    "            dt = dt / 10\n",
    "            next_approx = v0 + volume_change(q,0,T,dt)\n",
    "            if abs(next_approx - approx) < tolerance:\n",
    "                return round(next_approx,digits)\n",
    "            else:\n",
    "                approx = next_approx\n",
    "        raise Exception(\"Did not converge!\")\n",
    "    return volume_function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [],
   "source": [
    "v = get_volume_function(flow_rate,2.3,digits=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.878"
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "v(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [],
   "source": [
    "v = get_volume_function(flow_rate,2.3,digits=6)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This next line is commented out since it may take 10+ seconds to run, depending on your computer."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {},
   "outputs": [],
   "source": [
    "# v(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 5.4 Definite and indefinite integrals"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 6 Summary"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
